package com.yachtar.property.db;

import android.content.ContentValues;
import android.database.Cursor;

/**
 * ��Ԫ��Ϣ��
 * 
 * @author Administrator
 * 
 */
public class TUseCell implements IBean {
	/**
	 * ��Ӧ�ı���
	 */
	public final static String T_Name = "v_Fund_UseCell_ForVote";
	/**
	 * ��Ŀ��ţ���������Ŀ�����
	 */
	public final static String C_SERIALNO = "SERIALNO";
	/**
	 * ¥�����---��¥�������
	 */
	public final static String C_BUILDINGID = "BUILDINGID";
	/**
	 * ��Ԫ���
	 */
	public final static String C_CELLID = "CELLID";
	/**
	 * ��Ԫ����
	 */
	public final static String C_CELLNAME = "CELLNAME";
	public final static String[] tUseCellCols = new String[] {
			TUseCell.C_BUILDINGID, TUseCell.C_CELLID, TUseCell.C_CELLNAME,
			TUseCell.C_SERIALNO };

	/**
	 * ��Ŀ��ţ���������Ŀ�����
	 */
	private String serialNo;
	/**
	 * ¥�����---��¥�������
	 */
	private String buildingId;
	/**
	 * ��Ԫ���
	 */
	private String cellId;
	/**
	 * ��Ԫ����
	 */
	private String cellName;

	public String getSerialNo() {
		return serialNo;
	}

	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}

	public String getBuildingId() {
		return buildingId;
	}

	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	public String getCellId() {
		return cellId;
	}

	public void setCellId(String cellId) {
		this.cellId = cellId;
	}

	public String getCellName() {
		return cellName;
	}

	public void setCellName(String cellName) {
		this.cellName = cellName;
	}

	public void loadData(Cursor c) {
		if (c != null &&!c.isAfterLast()) {
			this.buildingId = c.getString(c.getColumnIndex(C_BUILDINGID));
			this.cellId = c.getString(c.getColumnIndex(C_CELLID));
			this.cellName = c.getString(c.getColumnIndex(C_CELLNAME));
			this.serialNo = c.getString(c.getColumnIndex(C_SERIALNO));
		}
	}

	public ContentValues createContentValues() {
		ContentValues values = new ContentValues();
		values.put(C_BUILDINGID, this.buildingId);
		values.put(C_CELLID, this.cellId);
		values.put(C_CELLNAME, this.cellName);
		values.put(C_SERIALNO, this.serialNo);
		return values;
	}

	@Override
	public void clearData() {
		// TODO Auto-generated method stub
		this.buildingId = null;
		this.cellId = null;
		this.cellName = null;
		this.serialNo = null;
	}

}
